package com.qf.petmall.starter.navtop.controller;


import com.qf.petmall.starter.navtop.entity.Navtop;
import com.qf.petmall.starter.navtop.service.INavtopService;
import com.qf.petmall.starter.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页中部导航模块 前端控制器
 * </p>
 *
 * @author author
 * @since 2022-12-06
 */
@CrossOrigin
@RestController
@RequestMapping("/navtop")
public class NavtopController {

    @Autowired
    INavtopService iNavtopService;

    @GetMapping("/getnavtop")
    public R listnavtop(){

        List<Navtop> list = iNavtopService.list();

        return R.ok().put("navtop",list);
    }
}
